using System.Collections.Generic;
using System.Linq;
using UnityEngine;

[CreateAssetMenu(fileName = "Effect28-给目标恢复已损失的生命值的额外生命", menuName = "Skill/Effect/Effect28-给目标恢复已损失的生命值的额外生命", order = 28)]
public class Effect28 : EffectBase
{
    public override void Apply(Pair pair, GameEvent e, List<Chess> targets)
    {
        if(targets == null || targets.Count == 0) return;

        foreach (var c in targets)
        {
            var extraHpCount = c.chessDate.health - c.ChessDetail.OriginalHp;
            c.HealExtraHp(extraHpCount);
        }
    }
}